# 1. 定义类
class A(object):
    a = 0

    def __init__(self):
        self.b = 1


# 2. 创建对象
aa = A()

# 3. 调用 __dict__，返回 字典
print(A.__dict__)
# {'__module__': '__main__', 'a': 0, '__init__': <function A.__init__ at 0x000001C80567DEE8>, '__dict__': <attribute '__dict__' of 'A' objects>, '__weakref__': <attribute '__weakref__' of 'A' objects>, '__doc__': None}

print(aa.__dict__)
# {'b': 1}